<?php
declare(strict_types=1);

namespace App\Controller\admin;

use App\Controller\AbstractController;
use App\Resource\Admin\SystemInfoResource;
use App\Service\Admin\StatisticsService;
use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\GetMapping;

#[Controller(prefix: '/api/admin/statistics')]
class StatisticsController extends AbstractController
{
    #[Inject]
    private StatisticsService $statisticsService;

    #[GetMapping('system-info')]
    public function getSystemInfo()
    {
        $data = $this->statisticsService->getSystemInfo();

        return new SystemInfoResource($data);
    }
}